/**
 * 
 */
package com.alkandros.linesmash.ui;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;

import com.alkandros.linesmash.R;
import com.alkandros.linesmash.location.ILocationCallBack;

/**
 * @author Jiju Induchoodan
 *
 */
public class Checkout extends BaseActivity implements OnClickListener,ILocationCallBack{
	private Intent intent;
	private TextView txtPayNow;
	private TextView txtBottomRight;
	@Override
	public void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_checkout);
		initialiseUI();
	}
	
	private void initialiseUI()
	{
		 txtPayNow  = (TextView)findViewById(R.id.txt_paynow);
		 setHeading(R.string.checkout);
		 setLeftButton();
		 setRightButton();
		 setCartButton();
		 txtPayNow.setOnClickListener(this);
		 txtBottomRight			= (TextView)findViewById(R.id.right_button);
	     txtBottomRight.setText(R.string.add_more);
	     txtBottomRight.setOnClickListener(this);
	}

	@Override
	public void onClick(View v) {
		if(v==txtPayNow)
		{
			intent = new Intent(Checkout.this,PayNow.class);
			startActivity(intent);
		}
		else if(v==txtBottomRight)
		{
			setResult(DINING_LOCATION_MENU);
			finish();
		}
	}

	/* (non-Javadoc)
	 * @see com.alkandros.linesmash.location.ILocationCallBack#setResult(java.lang.String)
	 */
	@Override
	public void setResult(String address) {
		// TODO Auto-generated method stub
		
	}

}
